package top.honlnk.mapper;

import org.apache.ibatis.annotations.*;
import top.honlnk.pojo.entity.RotaSecretKey;

import java.util.List;

@Mapper
public interface PublicMapper {

//    @Select("select * from rota_secret_key")
    List<RotaSecretKey> getRotaSecretKey();

    @Delete("delete from school_timetable where key_id = #{id}")
    int deleteSchoolTimetable(Integer id);

    @Delete("delete from rota_secret_key where id = #{id}")
    void deleteRotaSecretKey(Integer id);

    // 模糊查询key
    @Select("select * from rota_secret_key where admin_key like concat(#{key},'%') LIMIT 1")
    RotaSecretKey getRotaSecretKeyLike(String key);

    List<RotaSecretKey> getKeyListLike(List<String> keys);
}
